package com.cc.pms.controller;


import com.cc.pms.service.IMediaService;
import com.cc.common.core.domain.R;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import javax.annotation.Resource;
import java.util.Map;

@RestController
@RequestMapping
public class MediaController {

    @Resource
    private IMediaService iMediaService;

    @PostMapping("/image/upload")
    public R<Map<String , String>> uploadFile(@RequestParam("file") MultipartFile file){
        return iMediaService.uploadImage(file);
    };


}
